** This code reproduces the results from Study 1 (Table 3)

* Opens data
use "$directory/European Social Survey 6 and 10 DiD/data/ESS_final.dta", clear

** Step 1: Estimate coefficients for Table 3
reghdfe stfdem i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe implvdm i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe fairelc i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe dfprtal i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe gptpelc i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe medcrgv  i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe cttresa  i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)
reghdfe rghmgpr  i.selfcompletion i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp if repeat==1 [pweight=anweight], absorb (country essround) cluster (country)

** Step 2: Estimate Romano-Wolf adjusted P-values
rwolf stfdem implvdm fairelc dfprtal gptpelc medcrgv cttresa rghmgpr [pweight=anweight] if repeat==1, indepvar(selfcompletion) controls(i.gndr c.agea##c.agea i.eisced i.hincfel GDPpc1 contcorrupt ginidisp i.essround) reps(250) method(areg) abs(country) cluster (country) vce(cluster country) seed(1111)


* Note that Table 3 was created manually. Point estimates and standard errors obtained from regressions in Step 1 (for variable "i.selfcompletion"). P-values optained from Step 2. 
